package com.plugins.http;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.math.RandomUtils;

public class HttpUserAgent {
	
	private static final String firefox = "Mozilla/5.0 (Windows NT 5.1; rv:33.0) Gecko/20100101 Firefox/33.0";
	
	private static final String winphone_agent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)";
	
	private static List<String> userAgents = new ArrayList<>();
	
	static{
		userAgents.add(firefox);
		userAgents.add(winphone_agent);
	}
	
	public static String getUserAgent(){
		return userAgents.get(RandomUtils.nextInt(2));
	}
	
	public static void main(String[] args) {
		System.out.println(getUserAgent());
	}
}
